package com.yjy.lab02;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;
import java.util.Objects;

public class MyCommandLineRunner implements CommandLineRunner {

    Environment env;

    public MyCommandLineRunner(Environment env) {
        this.env = env;
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("========MyCommonLineRunner======");
        System.out.println("生成32位随机数:".concat(Objects.requireNonNull(env.getProperty("random."))));
    }
}
